package com.maoning.gulimallsearch.vo;

import com.maoning.common.to.es.SkuEsModel;
import lombok.Data;
import lombok.experimental.PackagePrivate;
import org.springframework.context.annotation.Primary;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author : 猫宁
 * @Date: 2022/2/11
 */
@Data
public class SearchResult {

    //查到的商品信息
    private List<SkuEsModel> products;
    /**
     * 以下是分页信息
     */
    private Integer pageNum;//当前页码
    private Long total;//总记录数
    private Long totalPages;//总页码
    private List<Integer> pageNavs;

    private List<BrandVo> brands;//品牌集合
    private List<AttrVo> attrs;//所涉及的属性集合
    private List<CatalogVo> catalogs;//所涉及的分类集合


    //构建面包屑导航
    private List<NavVo> navVos = new ArrayList<>();
    private List<Long> attrIds = new ArrayList<>();


    @Data
    public static class NavVo{
        private String navVoName;
        private String navVoValue;
        private String navVoLink;
    }

    @Data
    public static class BrandVo{
        private Long brandId;
        private String brandName;
        private String brandImg;
    }
    @Data
    public static class AttrVo{
        private Long attrId;
        private List<String> attrValue;
        private String attrName;
    }
    @Data
    public static class CatalogVo{
        private Long catalogId;
        private String catalogName;
    }

}
